xquery version "1.0";

<results>
{     
    for $department in
        doc("departments.xml")
        //department
       
    let 
        $dept_no := $department/dept_no
        
    where
        $dept_no = "d0001"
  
    return
        <id_dept_no>
        { 
            ($department/dept_name,$dept_no)
        }        
        </id_dept_no>
}
</results>